package com.ovo.dailypayaccount.service;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ovo.dailypayaccount.dao.PayDataDao;
import com.ovo.dailypayaccount.entity.PayData;

@Service("payDataService")
public class PayDataServiceImpl implements BasePayDataService {
	@Autowired
	private PayDataDao payDataDao;

	@Override
	public PayData getPayDataById(int id) {
		return payDataDao.selectByPrimaryKey(id);
	}

	@Override
	public int addPayData(PayData record) {
		return payDataDao.insert(record);
	}

	@Override
	public List<PayData> getDataOfWeek(Map<String,String> params) {
		return payDataDao.getDataOfWeek(params);
	}

	@Override
	public BigDecimal getSumPayDataOfWeek(Map<String,String> params) {
		return payDataDao.getSumPayDataOfWeek(params);
	}

	@Override
	public BigDecimal getSumPayDataOfMonth(Map<String,String> params) {
		return payDataDao.getSumPayDataOfMonth(params);
	}

	@Override
	public List<PayData> getDataOfDate(Map<String, String> params) {
		return payDataDao.getDataOfDate(params);
	}

	@Override
	public BigDecimal getSumPayDataOfDate(Map<String, String> params) {
		return payDataDao.getSumPayDataOfDate(params);
	}

}
